package com.tonghe6.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @Date:2022/1/12- 01- 12- 10:53
 **/
//等价于<bean id="user" class="com.tonghe6.pojo.User"/>
//    Component  组件
@Component
@Scope("singleton")
public class User {
    //相当于 <property name="name" value="TongHe"/>
    @Value("TongHe")
    public String name;
}
/*
* 去appli.xml中把返回调一下 com.tonghe6.pojo   ->  com.tonghe6 使所有注解生效 生成spring图标
* */